local M = {}

function M.setup()
  require("bufferline").setup({
    options = {
      mode = "buffers", -- 显示缓冲区而非标签页
      separator_style = "slant", -- 分隔符样式
      always_show_bufferline = true, -- 始终显示
      show_buffer_close_icons = false, -- 关闭按钮
      diagnostics = "nvim_lsp", -- 显示LSP诊断
      offsets = {
        {
          filetype = "NvimTree",
          text = "File Explorer",
          highlight = "Directory",
          padding = 1,
        }
      },
      custom_areas = {
        right = function()
          return {
            { text = " " .. os.date("%H:%M") } -- 显示时间
          }
        end,
      }
    },
    highlights = {
      buffer_selected = {
        italic = false,
        bold = true,
      },
    }
  })
end

return M
